{
  "properties" : { },
  "id" : "880099d570c0478b925649de7d976c6c",
  "script" : null,
  "groupId" : "168ab8e1df704072b606deba835794ac",
  "name" : "查询结果",
  "createTime" : null,
  "updateTime" : 1741367987207,
  "lock" : null,
  "createBy" : null,
  "updateBy" : null,
  "path" : "chatRes",
  "method" : "POST",
  "parameters" : [ ],
  "options" : [ {
    "name" : "require_login",
    "value" : "false",
    "description" : "该接口需要登录才允许访问",
    "required" : false,
    "dataType" : "String",
    "type" : null,
    "defaultValue" : null,
    "validateType" : null,
    "error" : null,
    "expression" : null,
    "children" : null
  } ],
  "requestBody" : "{\n    \"id\":25\n}",
  "headers" : [ {
    "name" : "token",
    "value" : "2bdec4e6-fde8-4f7f-9bb3-54a692a10edc",
    "description" : null,
    "required" : false,
    "dataType" : "String",
    "type" : null,
    "defaultValue" : null,
    "validateType" : null,
    "error" : null,
    "expression" : null,
    "children" : null
  } ],
  "paths" : [ ],
  "responseBody" : "{\n    \"code\": 200,\n    \"message\": \"success\",\n    \"data\": \"嘿嘿，那我这个大佬可得好好回应你啦。“宝贝，咱俩一起学习，共同进步，成为更好的我们！”（热恋暧昧风格）或者“你这是要把我捧上天啊，不过我愿意和你一起翱翔，探索更广阔的世界！”（热恋霸道总裁风格）\",\n    \"timestamp\": 1741024663937,\n    \"executeTime\": 6\n}",
  "description" : null,
  "requestBodyDefinition" : {
    "name" : "",
    "value" : "",
    "description" : "",
    "required" : false,
    "dataType" : "Object",
    "type" : null,
    "defaultValue" : null,
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ {
      "name" : "id",
      "value" : "25",
      "description" : "",
      "required" : false,
      "dataType" : "Integer",
      "type" : null,
      "defaultValue" : null,
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    } ]
  },
  "responseBodyDefinition" : {
    "name" : "",
    "value" : "",
    "description" : "",
    "required" : false,
    "dataType" : "Object",
    "type" : null,
    "defaultValue" : null,
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ {
      "name" : "code",
      "value" : "200",
      "description" : "",
      "required" : false,
      "dataType" : "Integer",
      "type" : null,
      "defaultValue" : null,
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "message",
      "value" : "success",
      "description" : "",
      "required" : false,
      "dataType" : "String",
      "type" : null,
      "defaultValue" : null,
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "data",
      "value" : "嘿嘿，那我这个大佬可得好好回应你啦。“宝贝，咱俩一起学习，共同进步，成为更好的我们！”（热恋暧昧风格）或者“你这是要把我捧上天啊，不过我愿意和你一起翱翔，探索更广阔的世界！”（热恋霸道总裁风格）",
      "description" : "",
      "required" : false,
      "dataType" : "String",
      "type" : null,
      "defaultValue" : null,
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "timestamp",
      "value" : "1740897133611",
      "description" : "",
      "required" : false,
      "dataType" : "Long",
      "type" : null,
      "defaultValue" : null,
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "executeTime",
      "value" : "25",
      "description" : "",
      "required" : false,
      "dataType" : "Integer",
      "type" : null,
      "defaultValue" : null,
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    } ]
  }
}
================================
import log
let record = db.table("chat_record").where().eq("id", body.id).selectOne()
if (record == null) {
    exit 400, "聊天记录不存在";
}
log.info("record"+record::stringify)
if (record.aiStatus == "completed") {
    return record.aiResult
} else {
    exit 412, "回复未完成";
}